<ul>
    <?php $i = -1 ?>
    <?php foreach ($doctor->getShows() as $doctorShow): ?>
        <?php $i++ ?>
        <?php if ($i == 6): ?>
            <?php break ?>
        <?php endif; ?>
        <li class="mini-photo">
            <a class="slideshow" href="/uploads/doctors/<?php echo $doctor->getId() ?>/<?php echo $doctorShow->getId() ?>/<?php echo $doctorShow->getPhotoUrl("resized") ?>" title="<?php echo $doctorShow->getCaption() ?>">
                <?php echo image_tag("/uploads/doctors/" . $doctor->getId() . "/" . $doctorShow->getId() . "/" . $doctorShow->getPhotoUrl($height), array("alt" => $doctor->getUser(), "height" => $height . "px")) ?>
            </a>
        </li>
    <?php endforeach; ?>
</ul>